#ifndef _ARRAYOFELEMENTS_HH_
#define _ARRAYOFELEMENTS_HH_

#include <cstddef>

typedef struct{
    size_t maxArraySize;
    size_t sizeElement;
    size_t currentArraySize;
    size_t* array;
} Struct_t;

/*
 * \brief    This method create a structure and return a pointer to it
 *
 * param [in] a_MaxSize         The maximum size of array which can
 *                              store in structure.
 * param [in] a_SizeElement     The size of elements into array
 *
 * return                       return a pointer to structure
 */
Struct_t* Create(const size_t a_MaxSize, const size_t a_SizeElement);

/*
 * \brief    This method add an element into structure
 * \detail   Add one element and return 0 is successfull else 1
 *
 * param [in] a_Struct          A structure which we have to change .
 * param [in] a_Pointer         A pointer for add into array
 *
 * return                       return 0 if saccessfull
 */
int Add(Struct_t& a_Struct, void* a_Pointer);

/*
 * \brief    This method delete an element into structure
 * \detail   Delete one element and return 1 or 0
 *
 * param [in] a_Struct          A structure which we have to change .
 * param [in] a_Pointer         A pointer for delete from array
 *
 * return                       return 0 if successfull else 1
 */

int Delete(Struct_t& a_Struct, void* a_Pointer);

/*
 * \brief    This method search element of array into structure
 * \detail   Search one element into array and return pointer
 *
 * param [in] a_Struct          A structure where we will search a pointer.
 * param [in] a_Pointer         A pointer for searching into array
 *
 * return                       A pointer to element of array into structure
 */
void* Search(Struct_t& a_Struct, void* a_Pointer);

#endif //#ifndef _ARRAYOFELEMENTS_HH_
